<!-- TinyMCE -->
<script type="text/javascript" src="../../../asset/scripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
	tinyMCE.init({
		// General options
		mode : "textareas",
		theme : "simple",
		plugins : "paste",

		theme_advanced_toolbar_location : "top", 
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true
	});	
</script>

<script type="text/javascript">
var qty = 0;
var amount = 0;
function hitungTotal(totalcont,val){
	//alert(totalcont.id);
	totalcont.value = (this.qty * this.amount);
}
function setQty(qty){
	this.qty = qty.value;
}
function setAmount(amt){
	this.amount = amt.value;
}
function onlyNumbers(evt) 
{
	evt = (evt) ? evt : window.event
	var charCode = (evt.which) ? evt.which : evt.keyCode
	if (charCode > 31 && (charCode < 48 || charCode > 57)) {
		//status = "This field accepts numbers only."
		alert("Harus di Isi Angka");
		return false
	}
	//status = ""
	return true 	
}
</script>
{transpo}
<form method="post" name="frmEdit" action="<?php echo site_url('returpembeliancontroller/ubahreturpembelian');?>">
    <h3 align="center"><u>EDIT RETUR PEMBELIAN</u> </h3>
    <table width="100%" cellpadding="3" cellspacing="0" border="1">
        <tr>
            <td width="131">Kode Retur</td>
            <td width="24" align="center">:</td>
            <td width="759" colspan="3"><input type="text"  name="kdretur" id="kdretur" maxlength="12" size="25" value="{ReturnNo}" readonly="readonly" /></td>
        </tr>
        <tr>
            <td width="131">Nama supplier</td>
            <td width="24" align="center">:</td>
            <td >            
          		<select name="kdsupp">
            		<option value="{KodeSupplier}">{Suppliername}</option>
                    <?php 
						$count = count($mstrsupp);
                    	foreach($mstrsupp as $comboInd)
						{
                    ?>
                    	<option value="<?php echo $comboInd->KodeSupplier?>"><?php echo $comboInd->Suppliername;?></option>
                    <?php }?>
                </select></td>
        </tr>
         <tr>
            <td width="131">Nama Barang</td>
            <td width="23" align="center">:</td>
            <td width="760" >
            	<select name="kdbarang">
                	<option value="{KodeDetailBarang}">{Productname}</option>
                    <?php 
						$count = count($mstrbrg);
                    	foreach($mstrbrg as $comboInd)
						{
                    ?>
                    	<option value="<?php echo $comboInd->KodeDetailBarang?>"><?php echo $comboInd->Productname;?></option>
                    <?php }?>
                </select></td>
        </tr>
        <tr>
            <td width="131">Jumlah Quantity</td>
            <td width="23" align="center">:</td>
            <td ><input type="text"  name="jmlhqty" id="jmlhqty" size="50" maxlength="4" value="{Quantity}" onkeypress="return onlyNumbers(event);"/>
            	<input type="hidden"  name="jmlhqtyawal" id="jmlhqtyawal" size="50" maxlength="4" value="{Quantity}" />
            </td>
        </tr>
        <tr>
            <td width="131">Harga Barang</td>
            <td width="23" align="center">:</td>
            <td ><input type="text"  name="hrgbarang" id="hrgbarang" size="50" maxlength="11" value="{Price}" onkeyup="javascript:setAmount(this);" onkeypress="return onlyNumbers(event);"/></td>
        </tr>
		<tr>
            <td width="131">Keterangan</td>
            <td width="24" align="center">:</td>
            <td ><input type="text"  name="keterangan" id="keterangan" size="100" maxlength="100" value="{Keterangan}"/></td>
        </tr> 
        <tr>
            <td colspan="3" align="center"><input type="submit" value="Save" name="btnSave" >&nbsp;<input type="button" name="btnClose" value="Back" class="btn" onclick="javascript:history.back(1);" /></td>
        </tr>
	</table>
</form>
{/transpo}